//
//  DYSetCell.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/21.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYSetCell.h"

@implementation DYSetCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)dy_initUI
{
    [super dy_initUI];
    
    self.sideMargin=BILIWIDTH(10);
    
    self.titleLabel=({
        UILabel *label=[Utils labelWithTitleFontSize:12 textColor:[UIColor xhq_content] alignment:0];
        label;
    });
    
    self.contentLabel=({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    self.arrow=({
        UIImageView *imageview=[Utils imageViewWithImage:IMG(@"arrow_right")];
        imageview;
    });
    
    self.rightLabel=({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_base] alignment:2];
        label;
    });
    
    [self addSubview:self.titleLabel];
    [self addSubview:self.contentLabel];
    [self addSubview:self.arrow];
    [self addSubview:self.rightLabel];
    
    [self.titleLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(BILIWIDTH(10));
        make.top.equalTo(BILIHEIGHT(10));
    }];
    
    [self.contentLabel makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(BILIHEIGHT(-1));
        make.height.equalTo(BILIHEIGHT(30));
        make.left.equalTo(BILIWIDTH(10));
    }];
    
    [self.arrow makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(BILIWIDTH(-10));
        make.centerY.equalTo(self);
    }];
    
    
    [self.rightLabel makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.arrow.left).offset(BILIWIDTH(-12));
        make.centerY.equalTo(self);
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
